﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:System="clr-namespace:System;assembly=mscorlib"
	mc:Ignorable="d"
	x:Class="Coding4Fun.Chair.Cockpit.Controls.Reticule"
	x:Name="UserControl"
	Width="{DynamicResource ReticuleSize}" Height="{DynamicResource ReticuleSize}">

	<UserControl.Resources>
		<System:Double x:Key="ReticuleSize">304</System:Double>
	</UserControl.Resources>

	<Grid x:Name="LayoutRoot" RenderTransformOrigin="0.5,0.5">
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="VisualStateGroup">
				<VisualStateGroup.Transitions>
					<VisualTransition GeneratedDuration="0:0:0.2"/>
				</VisualStateGroup.Transitions>
				<VisualState x:Name="ShowState"/>
				<VisualState x:Name="HideState">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LayoutRoot">
							<EasingDoubleKeyFrame KeyTime="0" Value="0.3"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="uxHorizontalIndicator">
							<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="uxVerticalIndicator">
							<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<Border BorderBrush="Black" BorderThickness="4" CornerRadius="13" Background="White" Opacity="0.3" >
			<Border.Effect>
				<BlurEffect Radius="10"/>
			</Border.Effect>
		</Border>

		<Grid>
            <Rectangle x:Name="uxHorizontalIndicator" Stroke="#7FFFFFFF" StrokeThickness="7" Width="15" Fill="White" HorizontalAlignment="Left" />
            <Rectangle x:Name="uxVerticalIndicator" Stroke="#7FFFFFFF" StrokeThickness="7" Height="15" Fill="White" VerticalAlignment="Top" />
		</Grid>
		<Border BorderBrush="White" BorderThickness="4" CornerRadius="13" />
	</Grid>
</UserControl>